//
//  ReversiValuateCurrentBoardVirtualPlayer.m
//  Reversi
//
//  Created by 成瀬 龍人 on 2/10/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "ReversiValuateCurrentBoardVirtualPlayer.h"


@implementation ReversiValuateCurrentBoardVirtualPlayer

- (ReversiBoardPosition*)nextHand:(ReversiStone)aStone:(ReversiBoard*)aBoard{
	NSArray* array = [aBoard allocatablePositions:aStone];
	int max = -1;
	ReversiBoardPosition* rev;
	for (ReversiBoardPosition* pos in array){
		int num = [aBoard numberOfWillChange:aStone:pos];
		if (num > max){
			rev = pos;
			max = num;
		}
	}
	return rev;
}

+ (NSString*)name{
	return @"ValuateCurrentBoard";
}

+ (NSString*)description{
	return @"Valuate current board";
}

@end
